package com.micro.shop.model;

import java.io.Serializable;

public class ProductImage implements Serializable {
    /**
     * 商品id
     * 表 : bestfenxiao_product_image
     * 对应字段 : product_id
     */
    private Integer productId;

    /**
     * 商品图片
     * 表 : bestfenxiao_product_image
     * 对应字段 : image
     */
    private String image;

    /**
     * 排序
     * 表 : bestfenxiao_product_image
     * 对应字段 : sort
     */
    private Integer sort;

    /**
     * This field was generated by MyBatis Generator.
     * This field corresponds to the database table bestfenxiao_product_image
     *
     * @mbggenerated Fri Apr 20 02:14:07 CST 2018
     */
    private static final long serialVersionUID = 1L;

    /**
     * get method 
     *
     * @return bestfenxiao_product_image.product_id：商品id
     */
    public Integer getProductId() {
        return productId;
    }

    /**
     * set method 
     *
     * @param productId  商品id
     */
    public void setProductId(Integer productId) {
        this.productId = productId;
    }

    /**
     * get method 
     *
     * @return bestfenxiao_product_image.image：商品图片
     */
    public String getImage() {
        return image;
    }

    /**
     * set method 
     *
     * @param image  商品图片
     */
    public void setImage(String image) {
        this.image = image == null ? null : image.trim();
    }

    /**
     * get method 
     *
     * @return bestfenxiao_product_image.sort：排序
     */
    public Integer getSort() {
        return sort;
    }

    /**
     * set method 
     *
     * @param sort  排序
     */
    public void setSort(Integer sort) {
        this.sort = sort;
    }

    /**
     *
     * @param that
     */
    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        ProductImage other = (ProductImage) that;
        return (this.getProductId() == null ? other.getProductId() == null : this.getProductId().equals(other.getProductId()))
            && (this.getImage() == null ? other.getImage() == null : this.getImage().equals(other.getImage()))
            && (this.getSort() == null ? other.getSort() == null : this.getSort().equals(other.getSort()));
    }

    /**
     *
     */
    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getProductId() == null) ? 0 : getProductId().hashCode());
        result = prime * result + ((getImage() == null) ? 0 : getImage().hashCode());
        result = prime * result + ((getSort() == null) ? 0 : getSort().hashCode());
        return result;
    }
}